package com.szr.leex.controller.test;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.szr.leex.controller.BaseController;
import com.szr.leex.dao.test.StudentDao;
import com.szr.leex.po.test.Student;

/**
 * student controller
 * Created by WangChen on 2018/9/12 17:09.
 */
@RestController
@RequestMapping("/student")
public class StudentController extends BaseController {

    @Autowired
    private StudentDao studentDao;

    @RequestMapping("/save")
    public void save(String id){
        Student student = new Student();
        student.setName("zhangsan");
        student.setAge(18);
        student.setId(id);
        studentDao.save(student);
    }
}
